<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://java.sun.com/jsf/core">

    <h:form id="frmTitle">
        <p:growl id="msgs" showDetail="false"/>
        <h:panelGrid columns="2" cellpadding="1">
            <h:outputText value="#{msgs.campusTitulo}" styleClass="fontTitle"/>
        </h:panelGrid>
    </h:form>

    <h:form id="frmNew">

        <p:fieldset legend="#{msgs.campusLgdNovo}">

            <h:panelGrid columns="2" id="pngNew">            

                <p:outputLabel for="lblnome" value="#{msgs.descricao}"/>
                <h:panelGrid columns="2">     
                    <p:inputText id="lblnome" value="#{campusNewMB.campus.descricao}" required="true" size="45"/>
                </h:panelGrid>

                <p:outputLabel for="lbltelefone" value="#{msgs.telefone}"/>
                <h:panelGrid columns="2">     
                    <p:inputMask id="lbltelefone" value="#{campusNewMB.campus.telefone}" mask="(99)9999-9999" size="45"/>
                </h:panelGrid>

                <p:outputLabel for="lblPais" value="#{msgs.pais}"/>
                <h:panelGrid columns="2">     
                    <p:inputText id="lblPais" value="#{campusNewMB.campus.endereco.pais}" size="30"/>
                </h:panelGrid>
                
                <p:outputLabel for="lblEstado" value="#{msgs.estado}"/>
                <h:panelGrid columns="2">     
                    <p:inputText id="lblEstado" value="#{campusNewMB.campus.endereco.estado}" size="25"/>
                </h:panelGrid>
                
                <p:outputLabel for="lblCidade" value="#{msgs.cidade}"/>
                <h:panelGrid columns="2">     
                    <p:inputText id="lblCidade" value="#{campusNewMB.campus.endereco.cidade}" size="25"/>
                </h:panelGrid>
                
                <p:outputLabel for="lblRua" value="#{msgs.rua}"/>
                <h:panelGrid columns="2">     
                    <p:inputText id="lblRua" value="#{campusNewMB.campus.endereco.rua}" size="45"/>
                </h:panelGrid>
                
                <p:outputLabel for="lblNumero" value="#{msgs.numero}"/>
                <h:panelGrid columns="2">     
                    <p:inputText id="lblNumero" value="#{campusNewMB.campus.endereco.numero}" required="true" size="45"/>
                </h:panelGrid>
                
                <p:outputLabel for="lblCep" value="#{msgs.cep}"/>
                <h:panelGrid columns="2">     
                    <p:inputMask id="lblCep" value="#{campusNewMB.campus.endereco.cep}" required="true" mask="99999-999" size="15"/>
                </h:panelGrid>               

                <h:panelGrid columns="2">
                    <p:commandButton id="btnSalvar" value="#{msgs.salvar}" action="#{campusNewMB.salvar}" ajax="false"/>
                    <p:commandButton id="btnVoltar" value="#{msgs.voltar}" action="#{campusNewMB.voltar}" ajax="false"/> 
                </h:panelGrid>
            </h:panelGrid>
    
        </p:fieldset>
    </h:form>
    
</html>

